package geppetto.phraseHMM.phraseExtraction.extractedphrase.data;

import geppetto.phraseHMM.phraseExtraction.extractedphrase.ExtractedPhrasePair;
import geppetto.phraseHMM.phraseExtraction.extractedphrase.ExtractedPhrasePairData;
import geppetto.phraseHMM.phraseExtraction.extractedphrase.ExtractedPhrasePairDataCalc;
import geppetto.phraseScorer.AbstractPhraseScorer;

import java.io.PrintStream;


public class ScoreDataCalc implements ExtractedPhrasePairDataCalc{

	protected AbstractPhraseScorer _scorer;
	
	public ScoreDataCalc(AbstractPhraseScorer _scorer) {
		super();
		this._scorer = _scorer;
	}


	public ExtractedPhrasePairData calcData(ExtractedPhrasePair epp) {
		return new ScoreData(_scorer.getPhraseScore(epp));
	}

	public ExtractedPhrasePairData loadFromString(String s) {
		return ScoreData.parseString(s);
	}
}
